#博客列表页
#from datetime import date
import time

from selenium.webdriver.common.by import By

from common.Utils import  BlogDriver
class  BlogList:
    url=""
    driver=""
    def __init__(self):
        self.url ="http://8.137.19.140:9090/blog_list.html"
        self.driver=BlogDriver.driver
        self.driver.get(self.url)
        #登录情况下
    def  ListRigText(self):
    #标题
            time.sleep(1)
            self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div:nth-child(1) > div.title")
            time.sleep(1)
    #文章
            self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div:nth-child(1) > div.desc")
    #查看文章那妞
            time.sleep(1)
            self.driver.find_element(By.CSS_SELECTOR,"body > div.container > div.right > div:nth-child(1) > a")
            BlogDriver.getScreenshot()
#List=BlogList()
#List.ListRigText()

